import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LearnComponent } from './learn.component';
import { CourseComponent } from './course/course.component';
import { MyPaperComponent } from './mypaper/mypaper.component';
import { MyScoreComponent } from './myscore/myscore.component';
import { MyHisPaperComponent } from './myhispaper/myhispaper.component';

const routes: Routes = [{
  path: '',
  component: LearnComponent,
  children: [
    {
      path: 'course',
      component: CourseComponent,
    },
    {
      path: 'mypaper',
      component: MyPaperComponent,
    },
    {
      path: 'myscore',
      component: MyScoreComponent,
    },
    {
      path: 'myhispaper',
      component: MyHisPaperComponent,
    },
  ],
}];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class LearnRoutingModule { }

export const routedComponents = [
  LearnComponent,
  CourseComponent,
  MyPaperComponent,
  MyScoreComponent,
  MyHisPaperComponent,
];
